PLAYERCCFLAGS = `pkg-config --cflags playerc`
PLAYERCLIBS = `pkg-config --libs playerc`
FMATH = -lm
OBJS = obj/rutils.o

main :
	$(info Usage: make ( bin/main | bin/generate | bin/tournament | bin/gapFillerBadKiller | bin/histogramiser ))

bin/main : src/main.c obj/rutils.o
	$(CC) $(PLAYERCCFLAGS) src/main.c $(OBJS) -o bin/main $(PLAYERCLIBS)

obj/rutils.o : src/rutils.c
	$(CC) $(PLAYERCCFLAGS) -c src/rutils.c -o obj/rutils.o $(PLAYERCLIBS) $(FMATH)

bin/generate : src/generate.cpp
	$(CXX) src/generate.cpp -o bin/generate

bin/fit : src/fit.cpp
	$(CXX) src/fit.cpp -o bin/fit

bin/tournament : src/tournament.c
	$(CC) src/tournament.c -o bin/tournament $(FMATH)

bin/gapFillerBadKiller : src/gapFillerBadKiller.c
	$(CC) src/gapFillerBadKiller.c -o bin/gapFillerBadKiller $(FMATH)

bin/histogramiser : src/histogramiser.c
	$(CC) src/histogramiser.c -o bin/histogramiser $(FMATH)

clean :
	rm -r obj/*.o bin/*
